<?php
namespace app\app\controller;


use app\common\model\Comment;
use app\common\model\StandardHeight;
use app\common\model\StandardWeight;
use app\common\model\User;

class Strandard extends Base
{

    public function index()
    {
        try{
            $girl_height = StandardHeight::where(['sex'=>2])->order('month asc')->select();
            $boy_height = StandardHeight::where(['sex'=>1])->order('month asc')->select();

            $girl_weight = StandardWeight::where(['sex'=>1])->order('month asc')->select();
            $boy_weight = StandardWeight::where(['sex'=>1])->order('month asc')->select();

            return $this->succeed('操作成功',['girl_height'=>$girl_height,'boy_height'=>$boy_height,'girl_weight'=>$girl_weight,'boy_weight'=>$boy_weight]);
        }catch (\Exception $e){
            return $this->fail($e->getMessage());
        }

    }
}
